class Profile {

    static belongsTo = [user:User]

    static constraints = {
        username(blank: false, size: 2..20, unique: true)
        type(inList: ['wedding', 'nest', 'baby', 'vendor'])
        gender(inLIst: ['female', 'male'])
        aboutMe(blank: true, maxSize: 500)
        interests(blank: true, maxSize: 500)
        occupation(blank: true, maxSize: 100)

        weddingProfile(nullable: true)
    }

    String type
    String username
    String gender
    String aboutMe
    String interests
    String occupation

    Date birthday

    // dependent objects
    WeddingProfile weddingProfile
    

    Date created = new Date()
    Date modified = new Date()

    String toString() {
        return "Profile: ${id}"
    }

}
